

/**
   This is a utility structure that is part of the aa_neighborhood
   library.  The naive implementation of the distance function
   calculates a graph isomorphism through brute-force trial and error.

   The code is based off of a C++ implementation at: 
   http://www.geocities.com/andygrebe/next_perm.h.html

   It had the following header:

     next_perm written by Andy Grebe
     Go ahead and use it whenever you want,
     just be nice and leave this in along with the code.
     
     You can speed it up on a Linux and prolly a Unix box
     by making each function inline and using the 
     -O when compiling for optimization.
     Oh, this runs ~2/3 faster than the stl next_perm
     on my Linux box when using the inline functions.

  permutation_next returns 1 on successs, 0 if it has already returned
  all of the permutations.
*/

int permutation_next(int * array, int length);

